<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>密码修改</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<style type="text/css">
table {
	font-size:1.2em;
	color: #4d87ce;
	border:solid 0px green;
	line-height:150%;
}
</style>
<link href="${pageContext.request.contextPath}/css/default.css" type="text/css" rel="stylesheet" />
<link href="${pageContext.request.contextPath}/js/validate/jquery.validate.css" type="text/css" rel="stylesheet" />
<script src="${pageContext.request.contextPath}/js/jquery.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/validate/jquery.validate.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/js/validate/messages_cn.js" type="text/javascript"></script>
<script>
	$(document).ready(function(){
		//聚焦第一个输入框
		$("#name").focus();
		//为inputForm注册validate函数
		$("#inputForm").validate({
			rules: { 
         		name: "required",
         		password: {
   					required: true,
   					minlength:6
   				}, 
   				newPassword: {
   					required: true,
   					minlength:6
   				},
   				passwordConfirm: {
   					required: true,
   					equalTo:"#newPassword"
   				}
			},
			messages: {
				passwordConfirm: {
					equalTo: "输入与上面相同的密码"
				}
			}
		});
	});
</script>
</head>  
<body>
<s:form id="inputForm" action="user-input!saveOrUpdate.do" method="post">
<table align="center" width="100%">
	<thead>
		<tr>
			<th> 
				&nbsp;
			</th>
			<th align="left"> 
				修改密码
				<s:actionmessage/>
			</th>
		</tr>
	</thead>
	<tr>
		<td align="right" width="40%"> 
			用户名： 
		</td>
		<td>
			<input type="text" id="name" name="name" style="width:150px;"/>			
		</td>
	</tr>
	<tr>
		<td align="right">
			旧密码：
		</td>
		<td>			
			<input type="password" id="password" name="password" style="width:150px;"/>
		</td>
	</tr>
	
	<tr>
		<td align="right">
			新密码：
		</td>
		<td>			
			<input type="password" id="newPassword" name="newPassword" style="width:150px;"/>
		</td>
	</tr>
	
	<tr>
		<td align="right">
			密码确认：
		</td>
		<td>			
			<input type="password" id="passwordConfirm" name="passwordConfirm" style="width:150px;"/>
		</td>
	</tr>
	<tr height="50px">
		<td>
			&nbsp;&nbsp;&nbsp;
		</td>
		<td>
			<input type="submit" value="提 交"/>
		</td>
	</tr>
</table>
</s:form>
</body>
</html>
